Skip to content

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Feb 7, 2020

Sadly, this mostly reverts #5121. Now I use HashMap to only store one rlib
per crate. But that would not work when non-compatible version of the same crate show up.

changelog: none

@tesuji
Copy link
Contributor Author

tesuji commented Feb 7, 2020

cc rust-lang/rust#68823
Log on Rustc: https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/20326/logs/87

2020-02-07T02:03:46.5892631Z error[E0460]: found possibly newer version of crate `if_chain` which `clippy_lints` depends on
2020-02-07T02:03:46.5893000Z    |
2020-02-07T02:03:46.5893304Z    = note: perhaps that crate needs to be recompiled?
2020-02-07T02:03:46.5893489Z    = note: the following crate versions were found:
2020-02-07T02:03:46.5894358Z            crate `if_chain`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-c235364af10680a8.rmeta
2020-02-07T02:03:46.5894922Z            crate `if_chain`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-c235364af10680a8.rlib
2020-02-07T02:03:46.5895393Z            crate `clippy_lints`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps/libclippy_lints-67a7525c7f333fed.rlib
2020-02-07T02:03:46.5895570Z 
2020-02-07T02:03:46.5895704Z error: aborting due to previous error

@tesuji
Copy link
Contributor Author

tesuji commented Feb 7, 2020

r? @matthiaskrgr

@tesuji tesuji requested a review from matthiaskrgr February 7, 2020 03:11
@tesuji tesuji changed the title Fix error E0460 when compiled on Rustc repo Rustup and fix error E0460 when compiled on Rustc repo Feb 7, 2020
@tesuji tesuji changed the title Rustup and fix error E0460 when compiled on Rustc repo [WIP] Rustup and fix error E0460 when compiled on Rustc repo Feb 7, 2020
@tesuji tesuji changed the title [WIP] Rustup and fix error E0460 when compiled on Rustc repo [WIP] Fix error E0460 when compiled on Rustc repo Feb 7, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Feb 7, 2020

I will have to check again. Cleaning the rmeta may cause cargo test rebuild
after running the test.

@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Feb 7, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Feb 8, 2020

r? @flip1995

@flip1995
Copy link
Member

flip1995 commented Feb 8, 2020

LGTM. Does this reopen #4015?

I think we need another rustup.

@tesuji tesuji force-pushed the rmeta branch 2 times, most recently from 3530375 to e63e22d Compare February 9, 2020 08:35
@flip1995
Copy link
Member

flip1995 commented Feb 9, 2020

Is there anything left to do (because of the [WIP])?

@tesuji tesuji changed the title [WIP] Fix error E0460 when compiled on Rustc repo Fix error E0460 when compiled on Rustc repo Feb 9, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Feb 9, 2020

Not really. I thought of some ways to resolve the issue:

  • Create a new crate with separate target dir that using compiletest test deps. Building and using
    the deps artifacts there.
    It complicates things, which includes parsing Cargo.toml,
  • Use dtolnay's trybuild instead of compiletest_rs.
    trybuild is nice and it uses cargo. But tests/**/auxiliary doesn't compile. I don't think it worth enough
    to make it build.
  • There is --build-plan flag for cargo build but it has problems as old code.

None of them seems to work.

@tesuji
Copy link
Contributor Author

tesuji commented Feb 9, 2020

Does this reopen #4015?

This bug may happen in these cases:

  • If there are global CARGO_TARGET_DIR, other projects builds with
    incompatible versions of serde, regex which clippy uses and builds.
  • Clippy upgrades to incompatible versions of serde, regex (which
    at this point v1.x.x) and rebuilds.

All of them could be resolve by cargo clean as always.
So, I hope it is not the same bug as #4015.

@flip1995
Copy link
Member

flip1995 commented Feb 9, 2020

If there are global CARGO_TARGET_DIR

I don't think this is a usual setup.

Clippy upgrades to incompatible versions of serde, regex

So this happens when the serde/regex version gets bumped. That should be manageable.

@bors r+ Thanks!

@bors
Copy link
Contributor

bors commented Feb 9, 2020

📌 Commit 9eb913a has been approved by flip1995

bors added a commit that referenced this pull request Feb 9, 2020
Fix error E0460 when compiled on Rustc repo

Sadly, this mostly reverts  #5121. Now I use HashMap to only store one rlib
per crate. But that would not work when non-compatible version of the same crate show up.

changelog: none
@bors
Copy link
Contributor

bors commented Feb 9, 2020

⌛ Testing commit 9eb913a with merge ab0cb30...

@bors
Copy link
Contributor

bors commented Feb 9, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing ab0cb30 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants